package com.cadre.common.utils.oldutil;

import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark;

import java.util.Map;

/* loaded from: DateHandler.class */
public class DateHandler implements CellHandler {
    @Override // com.tdqy.cadre.modular.profess.common.report.CellHandler
    public void setValue(XWPFParagraph paragraph, Map data) {
        CTBookmark bookmark = paragraph.getCTP().getBookmarkStartArray(0);
        String bk = bookmark.getName().toString();
        String year = bookmark.getName().toString();
        String pix = bk.substring(0, 10);
        String mm = pix + "_mm";
        String dd = pix + "_dd";
        paragraph.createRun().setText(((data.get(year) == null || "".equals(data.get(year))) ? "  年 " : data.get(year).toString() + "年") + ((data.get(mm) == null || "".equals(data.get(mm))) ? " 月 " : data.get(mm).toString() + "月") + ((data.get(dd) == null || "".equals(data.get(dd))) ? " 日 " : data.get(dd).toString() + "日"));
    }
}
